const {  logger } = require('../misc/logger');

module.exports = class HttpResponse {
	constructor() {
		this.errCode = 0
		this.errMsg = 'request:ok'
	}
	
	setError(e) {
		this.errCode = e.code || 1
		this.errMsg = e.message
		return this
	}
	
	setData(data) {
		Object.assign(this, data)
		return this
	}
}
